package joo.english.test;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;

public class level extends Activity 
implements OnClickListener{
private ImageButton lb1,lb2,lb3;
private Intent li;
private int selectedLevel;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.level);
        
        lb1 = (ImageButton)findViewById(R.id.le_Button01);
        lb2 = (ImageButton)findViewById(R.id.le_Button02);
        lb3 = (ImageButton)findViewById(R.id.le_Button03);
        
        lb1.setOnClickListener(this);
        lb2.setOnClickListener(this);
        lb3.setOnClickListener(this);
    
    }
	
	public void onClick(View v) {
		switch(v.getId()){
		case R.id.le_Button01: 
			selectedLevel = 1;
			li = new Intent(level.this,game.class);
			li.putExtra("level", selectedLevel);
			startActivity(li);
			break;
		case R.id.le_Button02: 
			selectedLevel = 2;
			li = new Intent(level.this,game.class);
			li.putExtra("level",selectedLevel);
			startActivity(li);
			break;
		case R.id.le_Button03: 
			selectedLevel = 3;
			li = new Intent(level.this,game.class);
			li.putExtra("level",selectedLevel);
			startActivity(li);
			break;
		}
	}
	
	
	
}
